package org.apache.commons.httpclient.protocol;

import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import javax.net.SocketFactory;
import javax.net.ssl.SSLSocketFactory;
import org.apache.commons.httpclient.ConnectTimeoutException;
import org.apache.commons.httpclient.params.HttpConnectionParams;

public class SSLProtocolSocketFactory
  implements SecureProtocolSocketFactory
{
  private static final SSLProtocolSocketFactory factory = new SSLProtocolSocketFactory();

  static SSLProtocolSocketFactory getSocketFactory()
  {
    return factory;
  }

  public Socket createSocket(String paramString, int paramInt)
    throws IOException, UnknownHostException
  {
    return SSLSocketFactory.getDefault().createSocket(paramString, paramInt);
  }

  public Socket createSocket(String paramString, int paramInt1, InetAddress paramInetAddress, int paramInt2)
    throws IOException, UnknownHostException
  {
    return SSLSocketFactory.getDefault().createSocket(paramString, paramInt1, paramInetAddress, paramInt2);
  }

  public Socket createSocket(String paramString, int paramInt1, InetAddress paramInetAddress, int paramInt2, HttpConnectionParams paramHttpConnectionParams)
    throws IOException, UnknownHostException, ConnectTimeoutException
  {
    if (paramHttpConnectionParams == null)
      throw new IllegalArgumentException("Parameters may not be null");
    int i = paramHttpConnectionParams.getConnectionTimeout();
    if (i == 0);
    Socket localSocket;
    for (Object localObject = createSocket(paramString, paramInt1, paramInetAddress, paramInt2); ; localObject = localSocket)
    {
      return localObject;
      localSocket = ReflectionSocketFactory.createSocket("javax.net.ssl.SSLSocketFactory", paramString, paramInt1, paramInetAddress, paramInt2, i);
      if (localSocket != null)
        continue;
      localSocket = ControllerThreadSocketFactory.createSocket(this, paramString, paramInt1, paramInetAddress, paramInt2, i);
    }
  }

  public Socket createSocket(Socket paramSocket, String paramString, int paramInt, boolean paramBoolean)
    throws IOException, UnknownHostException
  {
    return ((SSLSocketFactory)SSLSocketFactory.getDefault()).createSocket(paramSocket, paramString, paramInt, paramBoolean);
  }

  public boolean equals(Object paramObject)
  {
    if ((paramObject != null) && (paramObject.getClass().equals(super.getClass())));
    for (int i = 1; ; i = 0)
      return i;
  }

  public int hashCode()
  {
    return super.getClass().hashCode();
  }
}

/* Location:           E:\Desktop\Android\wordstd\classes_dex2jar.jar
 * Qualified Name:     org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory
 * JD-Core Version:    0.5.3
 */